﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
    CodeBehind="PropertyDetails2.aspx.cs" Inherits="LenderClearingHouse.PropertyDetails2"
    EnableEventValidation="false" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageHeader" runat="server">    
  <telerik:RadWindowManager runat="server" Behavior="Default" InitialBehavior="None"
        ID="RadWindowManager1" Modal="True" Behaviors="Resize, Close, Move" ReloadOnShow="True"
        ShowContentDuringLoad="False" VisibleStatusbar="False" VisibleTitlebar="True"
        Width="500px" Title="New Folder">
  </telerik:RadWindowManager>

    <table width="100%">
        <tr>
            <td><asp:HyperLink ID="hlPropertyDetails" runat="server" CssClass="title_txt">Property&nbsp;Details</asp:HyperLink></td>            
            <td width="100%">
                <asp:DataList ID="dlBreadcrumb" runat="server" RepeatColumns="10" 
                    onitemdatabound="dlBreadcrumb_ItemDataBound" onitemcommand="dlBreadcrumb_ItemCommand">
                    <ItemTemplate>
                        <div style="padding: 5px;">
                            <table cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td valign="middle">
                                        <asp:ImageButton ID="btnGoToFolder" runat="server" CommandName="GoToFolder" ImageUrl="~/images/folder_closed.png" />
                                    </td>
                                    <td align="left">
                                        <asp:LinkButton ID="btnFolderName" runat="server" CssClass="title_txt" CommandName="GoToFolder">LinkButton</asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td>
                <asp:HyperLink runat="server" ID="lnkEdit" CssClass="title_txt" style="padding-right:10px;">Edit Property</asp:HyperLink>
            </td>
            <td valign="middle" align="right" id="tdImageAddNewFolder" runat="server">
                <asp:ImageButton ID="imgAddNewFolder" runat="server" ImageUrl="~/images/folder_add.png"
                    OnClientClick="AddNewFolder(); return false;"/>
            </td>
            <td valign="middle" id="tdLinkAddNewFolder" runat="server">
                <asp:LinkButton ID="lnkAddNewFoder" runat="server" CssClass="title_txt" OnClientClick="AddNewFolder(); return false;">Add&nbsp;New&nbsp;Folder</asp:LinkButton>
            </td>
            <td width="10px">&nbsp;</td>
        </tr>
    </table>

    <script type="text/javascript">
        function AddNewFolder() {
            var oWnd = radopen("NewFolderDialog.aspx", "RadWindow1");
            oWnd.setSize(400, 200);
            oWnd.Center();
            return false;
        }

        function MoveFile(fileName) {
            var oWnd = radopen("MoveFileDialog.aspx?fileName=" + fileName, "RadWindow1");
            oWnd.setSize(400, 500);
            oWnd.set_title("Move file '" + fileName + "' to");
            oWnd.Center();
            return false;
        }

        function Refresh() {
            __doPostBack("<%= btnUpload.UniqueID %>", "Refresh")
        }
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMain" runat="server">
    <h2>
        <asp:ImageButton ID="btnPrevProperty" runat="server" 
            ToolTip="Previous property" ImageUrl="~/images/arrow2_left_green.png" 
            Width="24" Visible="False" onclick="btnPrevProperty_Click" />&nbsp;
        <asp:ImageButton ID="btnNextProperty" runat="server" 
            ToolTip="Next property" ImageUrl="~/images/arrow2_right_green.png" 
            Width="24" Visible="False" onclick="btnNextProperty_Click" />&nbsp;&nbsp;&nbsp;
        <asp:HyperLink ID="lnkAddress" runat="server" Target="_blank"></asp:HyperLink>
    </h2>
    <p id="pDetails" runat="server"><asp:Label ID="lbDetails" runat="server" Text=""></asp:Label></p>

    <asp:LinkButton ID="lbGallery" runat="server" OnClick="lbGallery_Click">Show gallery</asp:LinkButton>
    <div style="position: relative; width: 100%" id="divGallery" runat="server">
        <table height="332" width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="543">
                    <!-- "previous page" action -->
                    <div style="position: absolute; top: 120px; left: 20px; z-index: 1000">
                        <a class="prev browse left"></a>
                    </div>
                    <!-- root element for scrollable -->
                    <div class="scrollable">
                        <!-- root element for the items -->
                        <div class="items">
                            <asp:PlaceHolder ID="phItems" runat="server"></asp:PlaceHolder>
                        </div>
                    </div>
                    <!-- "next page" action -->
                    <div style="position: absolute; top: 120px; left: 480px; z-index: 1000">
                        <a class="next browse right"></a>
                    </div>
                    <br clear="all" />
                </td>
                <td width="100%" align="center" valign="top">
                    <asp:DataList ID="dlImages" runat="server" RepeatColumns="4" 
                        onitemdatabound="dlImages_ItemDataBound" onitemcommand="dlImages_ItemCommand" >
                        <ItemTemplate>
                            <div style="padding: 10px;">
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td valign="middle" style="padding-left: 10px">
                                            <asp:ImageButton ID="btnDeleteImage" runat="server" CommandName="DeleteImage"
                                                ImageUrl="~/images/Cancel.gif" OnClientClick="return confirm('Delete this image?');" />
                                        </td>
                                        <td style="padding-left: 10px" valign="top" width="100%">
                                            <asp:Image ID="imgImage" runat="server" Width="100" Height="100" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ItemTemplate>
                    </asp:DataList>
                </td>
            </tr>
        </table>
        <br />
    </div>    
    <table width="100%">
        <tr>
            <td width="50%" valign="top">
            <asp:DataList ID="dlFolders" runat="server" RepeatColumns="1" 
                    onitemdatabound="dlFolders_ItemDataBound" onitemcommand="dlFolders_ItemCommand" RepeatLayout="Table" RepeatDirection="Vertical">
                    <ItemTemplate>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td valign="middle">
                                    <asp:ImageButton ID="btnGoToFolder" runat="server" CommandName="GoToFolder"
                                        ImageUrl="~/images/folder_closed.png" />
                                </td>
                                <td align="left">
                                    <asp:LinkButton ID="btnFolderName" runat="server" CommandName="GoToFolder">LinkButton</asp:LinkButton>
                                </td>
                                <td valign="middle" style="padding-left: 10px">
                                    <asp:ImageButton ID="btnDeleteFolder" runat="server" CommandName="DeleteFolder"
                                        ImageUrl="~/images/Cancel.gif" OnClientClick="return confirm('Delete this folder with all subfolders and files?');" ToolTip="Delete folder" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>

                <asp:DataList ID="dlFiles" runat="server" RepeatColumns="1" 
                    onitemdatabound="dlFiles_ItemDataBound" onitemcommand="dlFiles_ItemCommand" RepeatLayout="Table" RepeatDirection="Vertical">
                    <ItemTemplate>
                        <table cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td valign="middle" style="padding-left:5px">
                                    <asp:ImageButton ID="btnDeleteFile" runat="server" CommandName="DeleteFile"
                                        ImageUrl="~/images/Cancel.gif" OnClientClick="return confirm('Delete this file?');" ToolTip="Delete file" />
                                </td>
                                <td valign="middle" style="padding-left: 10px">
                                    <asp:ImageButton ID="btnMoveFile" runat="server" CommandName="MoveFile"
                                        ImageUrl="~/images/arrow2_right_blue.png" ToolTip="Move file" />
                                </td>
                                <td style="padding-left: 10px" valign="top" width="100%">
                                    <asp:HyperLink ID="hlLink" runat="server" Target="_blank" />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td valign="top">
                <asp:Panel ID="panelUpload" runat="server" GroupingText="Upload documents/images">
                    <div style="margin: 10px">
                        <telerik:RadUpload ID="upload" runat="server" InputSize="100" OverwriteExistingFiles="True"
                            TargetFolder="~/Uploads" Width="700px"
                            ControlObjectsVisibility="RemoveButtons, AddButton" ReadOnlyFileInputs="True">
                        </telerik:RadUpload>
                        <asp:Label ID="lbDocumentsUploaded" runat="server" Font-Size="11px"></asp:Label>
                        <br />
                        <br />
                        <asp:Button ID="btnUpload" runat="server" Text="Upload all files" OnClick="btnUpload_Click" />
                    </div>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        $(function () { $(".scrollable").scrollable(); });
    </script>
</asp:Content>
